$(function(){
    $('#userList').DataTable({
        scrollX: true,
        ordering: false,
        serverSide: true,//true代表后台处理分页，false代表前台处理分页
        synchronizeClasses: [ 'editable', 'checkable', 'selectable' ],
        "fnDrawCallback": function( oSettings ) {
            pagination(oSettings);
            selectable();
        },
        ajax: {
            url: "/user/api/list",
            method: "post"
        },
        columns: [
            {
                data: "userName"
            },
            {
                data:"password",

            },
            {
                data: "isValid"
            }
        ]
    });


})